// import dotenv from 'dotenv';
class EnvUtil {
    /**
     * vite 环境变量容器
     */
    envObj: ImportMetaEnv;

    get(key: String){
        return this.envObj[key];
    };

    getEnv(){
        return this.envObj;
    }


    constructor(){
        this.envObj = import.meta.env;
    };
}

export interface ViteEnv {
    VITE_PORT: number;
    VITE_USE_MOCK: boolean;
    VITE_PUBLIC_PATH: string;
    VITE_PROXY: [string, string][];
}


export const envUtil = new EnvUtil();

// export function loadEnv(): ViteEnv {
//     const envList = ['.env.local', '.env', ,];
//     const ret: any = {};
//     envList.forEach((e) => {
//         dotenv.config({
//             path: e,
//         });
//     });
//     console.log('qweqweqe',process.env);
//     return ret;
// }
